/**
 * ©2013-2015 Alan L. Rights Reserved.
 */
package org.freedom.railhunter.model;

import java.io.Serializable;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

/**
 *
 * @author Alan
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class SubmitOrderResult implements Serializable {
    
    private String result;
    
    private boolean submitStatus;
    
    @JsonIgnore
    private String location_code;
    
    @JsonIgnore
    private String md5Str;
    
    @JsonIgnore
    private String leftTicketStr;
    
    @JsonIgnore
    private String isAsync;

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public boolean isSubmitStatus() {
        return submitStatus;
    }

    public void setSubmitStatus(boolean submitStatus) {
        this.submitStatus = submitStatus;
    }
    
    public void decomposeResult() {
        if (submitStatus) {
            String[] deResults = result.split("#");
            location_code = deResults[0];
            md5Str = deResults[1];
            leftTicketStr = deResults[2];
            isAsync = deResults[3];
        }
    }

    public String getLocation_code() {
        return location_code;
    }

    public void setLocation_code(String location_code) {
        this.location_code = location_code;
    }

    public String getMd5Str() {
        return md5Str;
    }

    public void setMd5Str(String md5Str) {
        this.md5Str = md5Str;
    }

    public String getLeftTicketStr() {
        return leftTicketStr;
    }

    public void setLeftTicketStr(String leftTicketStr) {
        this.leftTicketStr = leftTicketStr;
    }

    public String getIsAsync() {
        return isAsync;
    }

    public void setIsAsync(String isAsync) {
        this.isAsync = isAsync;
    }
}
